var p1 = new Promise(function (resolve, reject) {
    setTimeout(function () {
        resolve('p1');
    }, 100);
});
var p2 = new Promise(function (resolve, reject) {
    setTimeout(function () {
        reject(new Error('p2'));
    }, 200);
});
var p3 = new Promise(function (resolve, reject) {
    setTimeout(function () {
        resolve('p3');
    }, 250);
});
var pArr = [p1, p2, p3];
Promise.all(pArr).then(function (res) {
    console.log('then', res);
}).catch(function (err) {
    console.log('catch', err);
});
